package com.ziq.zcamp.api.service

import com.ziq.zcamp.api.request.camp.CampPunchListParam
import com.ziq.zcamp.api.request.post.*
import com.ziq.zcamp.api.request.topics.TopicsDetailsParam
import com.ziq.zcamp.api.respond.CampBaseRespond
import com.ziq.zcamp.api.respond.camp.MyCampingDataRespond
import com.ziq.zcamp.api.respond.camp.PlacePunchRecommendListRespond
import com.ziq.zcamp.api.respond.post.*
import com.ziq.zcamp.api.respond.topics.TopicsDetailsRespond
import com.ziq.zcamp.api.respond.topics.TopicsPostRespond
import com.ziq.zcamp.api.respond.topics.TopicsSearchRespond
import io.reactivex.Observable
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.QueryMap


interface PostingService {

    @GET(MY_CAMPING_DATA)
    fun myCampingData(@QueryMap params: HashMap<String, Any>): Observable<MyCampingDataRespond>

    @GET(POSTING_RECOMMEND_LIST_API)
    fun postingRecommendList(@QueryMap params: HashMap<String, Any>): Observable<PostingRecommendListRespond>

    @GET(POST_SUBJECT_API)
    fun postSubjectList(@QueryMap params: HashMap<String, Any>): Observable<PostSubjectListRespond>

    @POST(CREATE_POSTING_API)
    fun postCreate(@Body params: PostingCreateParam): Observable<CampBaseRespond>


    @POST(POSTING_LIKE_API)
    fun postingLike(@Body params: PostingLikeParam): Observable<CampBaseRespond>
    @POST(POSTING_UNLIKE_API)
    fun postingUnLike(@Body params: PostingUnLikeParam): Observable<CampBaseRespond>


    @GET(POST_SUBJECT_CONTENT_API)
    fun postSubjectContentList(@QueryMap params: HashMap<String, Any>): Observable<PostSubjectContentListRespond>

    @POST(POST_FOLLOW_LIST_API)
    fun postFollowList(@Body params: PostFollowListParam): Observable<PostFollowListRespond>

    @GET(POST_NEARBY_LIST_API)
    fun postingNearbyList(@QueryMap params: HashMap<String, Any>): Observable<PostingNearbyListRespond>

    @POST(PLACE_PUNCH_RECOMMEND_LIST)
    fun placeDetailPunchRecommend(@Body params: CampPunchListParam): Observable<PlacePunchRecommendListRespond>

    @POST(POSTING_DETAIL_API)
    fun postingDetail(@Body params: PostingDetailParam): Observable<PostingDetailRespond>

    @POST(POST_RECORD_API)
    fun postingRecord(@Body params: PostingRecordParam): Observable<CampBaseRespond>

    @POST(DELETE_POSTING_API)
    fun postingDelete(@Body params: PostingDeleteParam): Observable<CampBaseRespond>

    @GET(TOPICS_SEARCH_API)
    fun topicsSearch(@QueryMap params: HashMap<String, Any>): Observable<TopicsSearchRespond>

    @GET(TOPICS_DETAILS_API)
    fun topicsDetails(@QueryMap params: HashMap<String, Any>): Observable<TopicsDetailsRespond>

    @GET(COMMENT_PAGE_API)
    fun commentPage(@QueryMap params: HashMap<String, Any>): Observable<PostingCommentListRespond>

    @POST(COMMENT_CREATE_API)
    fun commentCreate(@Body params: CommentCreateParam): Observable<PostingCommentCreateRespond>

    @POST(COMMENT_REPLY_API)
    fun commentReply(@Body params: CommentReplyParam): Observable<PostingCommentReplyRespond>

    @POST(COMMENT_DELETE_API)
    fun commentDelete(@Body params: CommentDeleteParam): Observable<CampBaseRespond>

    @POST(COMMENT_LIKE_API)
    fun commentLike(@Body params: CommentLikeParam): Observable<CampBaseRespond>

    @GET(MORE_COMMENT_REPLY_API)
    fun moreCommentReply(@QueryMap params: HashMap<String, Any>): Observable<MoreCommentReplyRespond>

    @POST(POST_ADMIN_OPERATE_API)
    fun postOperate(@Body params: PostOperateParam): Observable<CampBaseRespond>

}